import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import java.util.Properties;
import java.util.Random;
/*
邮件发送测试类
 */
public class Test {


    public static void main (String[] args) {
        Random r= new Random();
        StringBuilder sb= new StringBuilder();
        for (int i = 0; i < 6; i++) {
            sb.append(r.nextInt(10));
        }

        boolean bool =EmailUtil.sendMail("18636790181@163.com", sb.toString()
                , "注册验证码");
        System.out.println(bool);
    }
}
